<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Reports_model extends CI_Model 
{
	function __construct()
	{
		parent:: __construct();
	}

	function getReportsCoordination($date_start, $date_end, $no)
	{
		if($no == "2") // result array
		{
			if($no == "2")
			{
				$sql = "select sod_id, sod_name, sod_floor, sod_location, sod_vendor_id, sod_vendor_name 
						from fm_so_det a, fm_so b 
						where a.so_id=b.so_id 
							and b.so_sdate >= to_date('".$date_start."','dd-mm-yyyy') 
							and b.so_sdate <= to_date('".$date_end."','dd-mm-yyyy')
						";
			}
			
			$result = $this->db->query($sql);
			$Udata = $result->result_array();
			$Rdata = $result->num_rows();
			
			if ($Rdata > 0)
			{
				return $Udata;
			}
			else
			{
				return FALSE;
			}
		}
		// else if($no == 1 || $no == 3) // result 1 row
		// {
			// if($no == 1)
			// {
				// $sql = "SELECT news.news_id, logs.username, news.news_date, news.news_title, news.news_content
						// FROM LKK_NEWS_MST news INNER JOIN logins logs ON logs.hr_id = news.hr_id";
			// }
			// else if($no == 3)
			// {
				// $sql = "SELECT news.news_id, logs.username, news.news_date, news.news_title, news.news_content
						// FROM LKK_NEWS_MST news INNER JOIN logins logs ON logs.hr_id = news.hr_id";
			// }
			
			// $result = $this->db->query($sql);
			// $Udata = $result->row_array();
			// $Rdata = $result->num_rows();
			// if ($Rdata > 0)
			// {
				// return $Udata;
			// }
			// else
			// {
				// return FALSE;
			// }
		// }
		else
		{
			return FALSE;
		}
	}
	
	function getReportsMailingRoom($date_start, $date_end, $no)
	{
		if($no == "2") // result array
		{
			if($no == "2")
			{
				$sql = "SELECT a.hr_id || ' - ' || (select hr.name from hrs hr where hr.id = a.hr_id) name,
							to_char(a.dmr_recieve_date,'dd/mm/yyyy') dmr_recieve_date, 
							a.dmr_courier_type, 
							case when a.DMR_COURIER_TYPE = 'MES' then (select mes.MESSENGER_NAME from FM_MST_MESSENGER mes where mes.MESSENGER_ID = a.COURIER_ID) 
								else (select cur.COURIER_NAME from FM_MST_COURIER cur where cur.COURIER_ID = a.COURIER_ID) 
								end 
								as courier_name,
							a.dmr_regional, 
							
							a.dmr_type, 
							a.dmr_category,
							nvl(a.dmr_berat,0) dmr_berat,
							case when nvl(a.dmr_berat,0) < 1 then nvl(e.price_1kg,0)
								when nvl(a.dmr_berat,0) > 5 then nvl(e.price_15kg,0)
								else nvl(e.price_5kg,0)
								end
								as price
						FROM fm_dmr a 
							inner JOIN fm_mst_area d 
								ON d.area_name = a.dmr_tujuan 
								AND d.regional_name = a.dmr_regional
							LEFT JOIN fm_courier_price e
								ON e.courier_id = a.courier_id 
								and e.area_id = d.area_id
						where
							a.dmr_recieve_date 
								between to_date('".$date_start."', 'DD/MM/YYYY') 
								and to_date('".$date_end."', 'DD/MM/YYYY')
						";
			}
			
			$result = $this->db->query($sql);
			$Udata = $result->result_array();
			$Rdata = $result->num_rows();
			
			if ($Rdata > 0)
			{
				return $Udata;
			}
			else
			{
				return FALSE;
			}
		}
		else
		{
			return FALSE;
		}
	}
	
	function getReportsOvertime($date_start, $date_end, $no)
	{
		if($no == "2") // result array
		{
			if($no == "2")
			{
				$sql = "SELECT Y.*
						FROM
						(
						SELECT X.*
						  ,ROUND((TO_DATE((CASE WHEN SO_EHOUR = '24' THEN SO_EDATE + 1 ELSE SO_EDATE END) || ' ' || (CASE WHEN SO_EHOUR = '24' THEN '00' ELSE SO_EHOUR END), 'DD-MM-YYYY HH24')
						   - TO_DATE((CASE WHEN SO_SHOUR = '24' THEN SO_SDATE + 1 ELSE SO_SDATE END) || ' ' || (CASE WHEN SO_SHOUR = '24' THEN '00' ELSE SO_SHOUR END), 'DD-MM-YYYY HH24')
						   )*24) TOTAL_HOUR
						  ,X.PRICE * ROUND((TO_DATE((CASE WHEN SO_EHOUR = '24' THEN SO_EDATE + 1 ELSE SO_EDATE END) || ' ' || (CASE WHEN SO_EHOUR = '24' THEN '00' ELSE SO_EHOUR END), 'DD-MM-YYYY HH24')
						   - TO_DATE((CASE WHEN SO_SHOUR = '24' THEN SO_SDATE + 1 ELSE SO_SDATE END) || ' ' || (CASE WHEN SO_SHOUR = '24' THEN '00' ELSE SO_SHOUR END), 'DD-MM-YYYY HH24')
						   )*24) SUBTOTAL
						FROM
						(
						SELECT Z.SO_NIP,
						 (SELECT NAME FROM HRS WHERE HRS.ID = Z.SO_NIP) SO_NAME,
						  Z.SO_ID,
						  Z.DTMUPD,
						  Z.SOD_FLOOR,
						  Z.SO_SDATE,
						  Z.SO_EDATE,
						  Z.SO_SHOUR,
						  Z.SO_EHOUR,
						  (CASE WHEN (Z.SOD_TYPE_PRICE_ID = 'SETENGAHB' OR Z.SOD_TYPE_PRICE_ID = 'SETENGAHD') THEN '1/2 Lantai'
							WHEN Z.SOD_TYPE_PRICE_ID = 'SATU' THEN '1 Lantai'
							ELSE ' ' END) PRICE_DESC,
						  (CASE WHEN (Z.SOD_TYPE_PRICE_ID = 'SETENGAHB' OR Z.SOD_TYPE_PRICE_ID = 'SETENGAHD') THEN (select det_price from fm_det_document where det_type_price = 1)
							WHEN Z.SOD_TYPE_PRICE_ID = 'SATU' THEN (select det_price from fm_det_document where det_type_price = 2)
							ELSE 0 END) PRICE
						  FROM
						  (
							SELECT 	A.SO_ID, 
								A.SO_NIP, 
								A.DTMUPD, 
								A.SO_SDATE, 
								TO_CHAR(A.SO_SDATE,'DAY') SO_SDATE_DAY, 
								A.SO_EDATE, 
								TO_CHAR(A.SO_EDATE,'DAY') SO_EDATE_DAY, 
								SUBSTR((CASE WHEN A.SO_SHOUR LIKE '_:__' THEN '0' || A.SO_SHOUR ELSE A.SO_SHOUR END),1,2) SO_SHOUR, 
								SUBSTR((CASE WHEN A.SO_EHOUR LIKE '_:__' THEN '0' || A.SO_EHOUR ELSE A.SO_EHOUR END),1,2) SO_EHOUR, 
								B.SOD_FLOOR, 
								B.SOD_TYPE_PRICE_ID
							FROM FM_SO A, 
							  FM_SO_DET B 
							WHERE A.SO_ID = B.SO_ID
							  AND (TRUNC(A.DTMUPD) BETWEEN TO_DATE('".$date_start."', 'DD/MM/YYYY') 
							  AND TO_DATE('".$date_end."', 'DD/MM/YYYY'))
							GROUP BY 	A.SO_ID, 
								  A.SO_NIP, 
								  A.DTMUPD, 
								  A.SO_SDATE, 
								  A.SO_EDATE, 
								  SO_SHOUR, 
								  SO_EHOUR, 
								  B.SOD_FLOOR, 
								  B.SOD_TYPE_PRICE_ID
						  ) Z
						) X
						) Y
						ORDER BY Y.DTMUPD ASC
						";
			}
			
			//--WHERE X.SO_SHOUR = '00' OR X.SO_EHOUR = '00'
			//--ORDER BY Y.TOTAL_HOUR DESC
			
			$result = $this->db->query($sql);
			$Udata = $result->result_array();
			$Rdata = $result->num_rows();
			
			if ($Rdata > 0)
			{
				return $Udata;
			}
			else
			{
				return FALSE;
			}
		}
		else
		{
			return FALSE;
		}
	}
	
	// getReportsOvertimeDetail
	function getReportsOvertimeDetail($id)
	{
		$sql = "select z.*,
				(SELECT NAME FROM HRS WHERE HRS.ID = so_manager_id) so_manager_name
				from
				(
				select 	so_id,
						(SELECT NAME FROM HRS WHERE HRS.ID = so_nip) so_name,
						(SELECT MSISDN FROM HRS WHERE HRS.ID = so_nip) so_hp,
						(SELECT MANAGER FROM HRS WHERE HRS.ID = so_nip) so_manager_id,
						so_untuk_nik, 
						so_nip, 
						to_char(so_sdate,'dd/mm/yyyy') so_sdate, 
						to_char(so_edate,'dd/mm/yyyy') so_edate, 
						so_comment, 
						(substr(so_shour,1,2) || ':' || substr(so_shour,4,2)) so_shour, 
						(substr(so_ehour,1,2) || ':' || substr(so_ehour,4,2)) so_ehour, 
						so_description, 
						so_ac, 
						so_lift, 
						so_lighting, 
						so_other, 
						so_other_description, 
						so_atasan_nik
				from fm_so 
				where so_id = '".$id."'
				) z
				";
		
		
		$result = $this->db->query($sql);
		$Udata = $result->row_array();
		$Rdata = $result->num_rows();
		
		if ($Rdata > 0)
		{
			return $Udata;
		}
		else
		{
			return FALSE;
		}
	}
	
	// overtime detail person
	function getReportsOvertimeDetailPerson($id)
	{
		$sql = "select 	sod_id, 
						sod_name, 
						so_id, 
						sod_floor, 
						sod_location, 
						sod_vendor_id, 
						sod_vendor_name 
				from fm_so_det 
				where so_id = '".$id."' 
				";
		
		$result = $this->db->query($sql);
		$Udata = $result->result_array();
		$Rdata = $result->num_rows();
		
		if ($Rdata > 0)
		{
			return $Udata;
		}
		else
		{
			return FALSE;
		}
	}
	
	function getReportsPagingInfo($date_start, $date_end)
	{
		
			$sql = "select
						b.ID,b.NAME,a.INFO_SDATE,a.INFO_SHOUR,a.INFO_SMINUTE,
						a.INFO_REPETITION,a.INFO_REPETITION_JUMLAH,a.INFO_REPETITION_TIAP,a.INFO_KETERANGAN
					from
						fm_paging_info a
						join hrs b on b.id=a.info_nik
					where
						a.info_sdate between to_date('".$date_start."', 'DD/MM/YYYY') and to_date('".$date_end." 23:59:59', 'DD/MM/YYYY HH24:MI:SS')
			
					";
			
			$result = $this->db->query($sql);
			$Udata = $result->result_array();
			$Rdata = $result->num_rows();
			
			if ($Rdata > 0)
			{
				return $Udata;
			}
			else
			{
				return FALSE;
			}
	}
	
	function getReportsParking($date_start, $date_end, $no, $qty_awal, $qty_akhir)
	{
		if($no == "1" || $no == "2" || $no == "3") // result array
		{
			if($no == "1") // motor
			{
				$sql = "select a.parkird_untuk_nik, a.parkird_date, a.parkird_plat, a.parkird_id, b.name, b.status, b.contract_sdate, b.contract_edate, b.org 
						from fm_parkir_det a, hrs b 
						where 	a.parkird_untuk_nik = b.id 
							and a.parkird_flag_4='Y'
							and a.parkird_date between to_date('".$date_start."', 'DD/MM/YYYY') 
							and to_date('".$date_end." 23:59:59', 'DD/MM/YYYY HH24:MI:SS')
						order by parkird_id asc
						";
						
				//echo $sql; die();
			}
			else if($no == "2") // mobil reserved
			{
				$sql = "select a.parkird_untuk_nik, a.parkird_date, a.parkird_plat, a.parkird_id, b.name, b.status, b.contract_sdate, b.contract_edate, b.org 
						from fm_parkir_det a, hrs b 
						where a.parkird_untuk_nik = b.id 
							and a.parkird_type = 'MOBIL' 
							and rownum >= ".$qty_awal." 
							and rownum <= ".$qty_akhir."
							and a.parkird_date between to_date('".$date_start."', 'DD/MM/YYYY') 
							and to_date('".$date_end." 23:59:59', 'DD/MM/YYYY HH24:MI:SS')
						order by parkird_id asc
						";		
			}
			else if($no == "3") // mobil non-reserved
			{
				$sql = "select a.parkird_untuk_nik, a.parkird_date, a.parkird_plat, a.parkird_id, b.name, b.status, b.contract_sdate, b.contract_edate, b.org 
						from fm_parkir_det a, hrs b 
						where a.parkird_untuk_nik = b.id 
							and a.parkird_type = 'MOBIL' 
							and rownum >= ".$qty_awal." 
							and rownum <= ".$qty_akhir." 
							and a.parkird_date between to_date('".$date_start."', 'DD/MM/YYYY') 
							and to_date('".$date_end." 23:59:59', 'DD/MM/YYYY HH24:MI:SS')
						order by parkird_id asc
						";
			}
			
			$result = $this->db->query($sql);
			$Udata = $result->result_array();
			$Rdata = $result->num_rows();
			
			if ($Rdata > 0)
			{
				return $Udata;
			}
			else
			{
				return FALSE;
			}
		}
		else
		{
			return FALSE;
		}
	}
	
	function getReportsParkingPriceHeader($no)
	{
		if($no == "1" || $no == "2" || $no == "3") // result array
		{
			if($no == "1") // motor
			{
				$sql = "select det_price, det_price_unit, det_satuan, det_qty_awal, det_qty_akhir 
						from fm_det_document 
						where det_type_price = 6
						";
			}
			else if($no == "2") // mobil reserved
			{
				$sql = "select det_price, det_price_unit, det_satuan, det_qty_awal, det_qty_akhir 
						from fm_det_document 
						where det_type_price = 4
						";
			}
			else if($no == "3") // mobil non-reserved
			{
				$sql = "select det_price, det_price_unit, det_satuan, det_qty_awal, det_qty_akhir 
						from fm_det_document 
						where det_type_price = 5
						";
			}
			
			$result = $this->db->query($sql);
			$Udata = $result->row_array();
			$Rdata = $result->num_rows();
			
			if ($Rdata > 0)
			{
				return $Udata;
			}
			else
			{
				return FALSE;
			}
		}
		else
		{
			return FALSE;
		}
	}
    
    //======================================ADD BY ANDI SISWANTO=======================================
    function getReportsRepairMaintenance($date_start, $date_end, $no)   //8-07-2014
	{
		if($no == "2") // result array
		{
			if($no == "2")
			{
				/*$sql = "select sod_id, sod_name, sod_floor, sod_location, sod_vendor_id, sod_vendor_name 
						from fm_so_det a, fm_so b 
						where a.so_id=b.so_id 
							and b.so_sdate >= to_date('".$date_start."','dd-mm-yyyy') 
							and b.so_sdate <= to_date('".$date_end."','dd-mm-yyyy')
						";
                */
                $sql="
                    SELECT a.rm_create_date,
             			b.ID, b.NAME, a.RM_DATE, a.RM_RETURN, a.RM_TYPE, a.RM_CATEGORY, a.RM_SERIAL, a.RM_DESCRIPTION
              		FROM
             			fm_rm a join hrs b on b.id=a.rm_untuk_nik
              		WHERE
                        a.rm_create_date between to_date('".$date_start."','dd-mm-yyyy') and to_date('".$date_end."','dd-mm-yyyy')
                    ORDER BY a.rm_create_date ASC
                ";        
			}
			
			$result = $this->db->query($sql);
			$Udata = $result->result_array();
            //var_dump($Udata); exit;
			$Rdata = $result->num_rows();
			
			if ($Rdata > 0)
			{
				return $Udata;
			}
			else
			{
				return FALSE;
			}
		}
		else
		{
			return FALSE;
		}
	}
    
    function getReportsPublicRoom($date_start, $date_end, $no)  //10-07-2014
	{
		if($no == "2") // result array
		{
			if($no == "2")
			{
                $sql="
                    SELECT  
                            c.ID, c.NAME, b.DTMUPD, b.ROOM_JENIS, b.ROOM_TYPE, b.ROOM_FLOOR, b.ROOM_DATE,
                            b.ROOM_SHOUR, b.ROOM_SMINUTE, b.ROOM_EHOUR, b.ROOM_EMINUTE, b.ROOM_CONDITION, b.ROOM_DESCRIPTION,
                            (SELECT b.usrupd||' - '||x.name FROM hrs x WHERE x.id = b.usrupd) NAME2
                    FROM
                            fm_meeting a
                            JOIN fm_meeting_room b on b.room_id=a.room_id
                            JOIN hrs c on c.id=b.room_untuk_nik
                    WHERE
                            b.room_date between to_date('" . $date_start . "', 'DD/MM/YYYY') and to_date('" . $date_end . " 23:59:59', 'DD/MM/YYYY HH24:MI:SS')
                    ORDER BY b.room_date ASC        
                ";        
			}
			
			$result = $this->db->query($sql);
			$Udata = $result->result_array();
            //var_dump($Udata); exit;
			$Rdata = $result->num_rows();
			
			if ($Rdata > 0)
			{
				return $Udata;
			}
			else
			{
				return FALSE;
			}
		}
		else
		{
			return FALSE;
		}
	}
    
    function getReportsSik($date_start, $date_end, $no) //10-07-2014
	{
		if($no == "2") // result array
		{
			if($no == "2")
			{
                $sql="
                    SELECT
            			b.id, b.name, c.vendor_name, a.sik_create_date, a.sik_sdate, a.sik_edate, a.vendor_pic
                    FROM
                        fm_sik a
                        JOIN hrs b on b.id=a.sik_untuk_nik
                    	JOIN lkk_vendor_mst c on c.vendor_id=a.vendor_id
                    WHERE
                        a.sik_create_date BETWEEN to_date('".$date_start."', 'DD/MM/YYYY') 
                        AND to_date('".$date_end." 23:59:59', 'DD/MM/YYYY HH24:MI:SS')
                    ORDER BY
                          a.sik_create_date ASC      
                ";        
			}
			
			$result = $this->db->query($sql);
			$Udata = $result->result_array();
            //var_dump($Udata); exit;
			$Rdata = $result->num_rows();
			
			if ($Rdata > 0)
			{
				return $Udata;
			}
			else
			{
				return FALSE;
			}
		}
		else
		{
			return FALSE;
		}
	}
    function getReportsSaran($date_start, $date_end, $no) //11-07-2014
	{
		if($no == "2") // result array
		{
			if($no == "2")
			{
                $sql="
                    SELECT
            			b.ID, b.NAME, c.MST_TYPE_DESC, a.POBOX_DATE,a.POBOX_TYPE, a.POBOX_RELATEDTO,
            			a.POBOX_DESCRIPTION, a.POBOX_GA_APP_DATE, a.POBOX_GA_APP_FOLLOW
            		FROM
            			fm_pobox a
            			JOIN hrs b ON b.id=a.pobox_untuk_nik
            			JOIN fm_mst_type c ON c.mst_type_id=a.type_id
            		WHERE
            			a.pobox_date BETWEEN to_date('".$date_start."', 'DD/MM/YYYY') 
                            AND to_date('".$date_end." 23:59:59', 'DD/MM/YYYY HH24:MI:SS')
                    ORDER BY
                          a.pobox_date ASC      
                ";        
			}
			
			$result = $this->db->query($sql);
			$Udata = $result->result_array();
            //var_dump($Udata); exit;
			$Rdata = $result->num_rows();
			
			if ($Rdata > 0)
			{
				return $Udata;
			}
			else
			{
				return FALSE;
			}
		}
		else
		{
			return FALSE;
		}
	}
    function getReportsOutstandingGa($date_start, $date_end, $no) //11-07-2014
	{
		if($no == "2") // result array
		{
			if($no == "2")
			{
			    //ORIGINAL QUERY
                    //select req_closing,type, requestor, request_no, to_char(sdate,'dd/mm/yyyy') sdate, 
                    //description, ga_app, to_char(ga_app_date,'dd/mm/yyyy') ga_app_date 
                    //from v_outstanding_ga
                //== 
                $sql="
                    SELECT  
                        b.name,
                        a.req_closing, a.type, a.requestor, a.request_no, to_char(a.sdate,'dd/mm/yyyy') sdate, a.description, a.ga_app, 
                        to_char(a.ga_app_date,'dd/mm/yyyy') ga_app_date 
                    FROM 
                        v_outstanding_ga a
                    JOIN hrs b 
                        ON b.id=a.requestor
                    WHERE
                        a.sdate BETWEEN to_date('".$date_start."', 'DD/MM/YYYY') 
                            AND to_date('".$date_end." 23:59:59', 'DD/MM/YYYY HH24:MI:SS')
                    ORDER BY
                        a.sdate ASC      
                ";        
			}
			
			$result = $this->db->query($sql);
			$Udata = $result->result_array();
            //var_dump($Udata); exit;
			$Rdata = $result->num_rows();
			
			if ($Rdata > 0)
			{
				return $Udata;
			}
			else
			{
				return FALSE;
			}
		}
		else
		{
			return FALSE;
		}
	}
    function getReportsSpaceManagement($date_start, $date_end, $no) //11-07-2014
	{
		if($no == "2") // result array
		{
			if($no == "2")
			{
			    //ORIGINAL QUERY
                    //SELECT A.REQ_ID, A.REQ_UNTUK_NIK, B.RBF_ROOM, A.REQ_DATE, A.REQ_FLOOR, B.RBF_ID, B.RBF_FLOOR 
	                //FROM FM_REQ_HEAD A, FM_ROOM_BY_FLOOR B 
		            //WHERE A.REQ_RBF_ID = B.RBF_ID

                //== 
                
                //no relasi
                $sql="
                    SELECT 
                        A.REQ_ID, A.REQ_UNTUK_NIK, A.REQ_DATE, A.REQ_FLOOR, B.NAME, B.JOB
                    FROM 
                        FM_REQ_HEAD A
                    LEFT JOIN    
                        HRS B
                    ON b.id=a.req_untuk_nik
                    WHERE  
                        A.req_date BETWEEN to_date('".$date_start."', 'DD/MM/YYYY') 
                        AND to_date('".$date_end." 23:59:59', 'DD/MM/YYYY HH24:MI:SS')    
                ";        
			}
			
			$result = $this->db->query($sql);
			$Udata = $result->result_array();
            //var_dump($Udata); exit;
			$Rdata = $result->num_rows();
			
			if ($Rdata > 0)
			{
				return $Udata;
			}
			else
			{
				return FALSE;
			}
		}
		else
		{
			return FALSE;
		}
	}
    function getReportsTraffic($date_start, $date_end, $lantai, $serial, $no) //15-07-2014
	{
		if($no == "2") // result array
		{
			if($no == "2")
			{
                //no relasi
                $sql="
                    SELECT A.TRAFFIC_ID, A.TRAFFIC_USER_NAME, A.TRAFFIC_USER_TYPE,
                             to_char(A.TRAFFIC_SDATE,'DD/MM/YYYY') TRAFFIC_SDATE, A.TRAFFIC_SHOUR||':'||A.TRAFFIC_SMINUTE as WAKTU_AWAL,
                             to_char(A.TRAFFIC_EDATE,'DD/MM/YYYY') TRAFFIC_EDATE, A.TRAFFIC_EHOUR||':'||A.TRAFFIC_EMINUTE as WAKTU_AKHIR,
                             A.TRAFFIC_FLOOR, A.TRAFFIC_SERIAL
                    FROM fm_traffic a
                    WHERE 1 = 1
                        and trunc(A.TRAFFIC_SDATE) between to_date('01-07-2014', 'DD/MM/YYYY') 
                        and to_date('14-07-2014 23:59:59', 'DD/MM/YYYY HH24:MI:SS')  
                ";  
                if(!empty($lantai)){
                    $sql.=" and upper(trim(A.TRAFFIC_FLOOR)) = upper(trim('$lantai'))";
                }
                if(!empty($serial)){
                    $sql.=" and upper(trim(A.TRAFFIC_SERIAL)) like upper(trim('%$serial%'))";
                }      
			}
			
            $order=" ORDER BY A.TRAFFIC_SDATE ASC";
            $sqlnya= $sql.$order;
			$result = $this->db->query($sqlnya);
			$Udata = $result->result_array();
            //var_dump($Udata); exit;
			$Rdata = $result->num_rows();
			
			if ($Rdata > 0)
			{
				return $Udata;
			}
			else
			{
				return FALSE;
			}
		}
		else
		{
			return FALSE;
		}
	}
    //========================================END ANDI SISWANTO========================================
}